import random

def estimate_pi(num_throws):
    inside_circle = 0
    for _ in range(num_throws):
        x = random.uniform(-1,1)
        y = random.uniform(-1,1)
        if x**2 + y**2 <= 1:
            inside_circle += 1
    pi_estimate = 4*inside_circle / num_throws
    return pi_estimate

print(estimate_pi(100000))